<ion-view view-title="领单">
  <ion-content class="padding">
    <div>
      <div class="item button-bar" >
        <a class="button" ng-click="barscan()">扫码领单</a>
      </div>
    </div>
    <div>
      <div class="item button-bar" >
        <input class="" type="tel" style="width: 75%;" ng-model="orderid" placeholder="输入至少6位连续订单号(手动领单)">
        <a class="button" ng-click="getOrdersArray(orderid)">搜索</a>
      </div>
    </div>
    <div class="list card" ng-repeat="order in ordersArray" href="#">
      <div class="item">
        <h2>{{order.get('areaId') | area}}区-{{order.get('orderid')}}</h2>
      </div>
      <div class="item item-body">
        <p ng-if="(order.get('type') === 9)">
          商家名称：{{order.get('sellerName')}}--{{order.get('storeName')}}
        </p>
        <p>
          订单状态：{{order.get('status') | orderState}}
        </p>
        <p>
          派送地址：{{order.get('address').address}}
        </p>
        <p>
          收件人：{{order.get('address').name}} <a href="tel:{{order.get('address').phone}}">{{order.get('address').phone}}</a>
        </p>
        <p>
          订单备注：{{order.get('remark')}}
        </p>
        <button class="button button-block button-calm" ng-click="getPackage(event,order,$index)">确认已领取包裹</button>
      </div>
    </div>
    <div ng-if="(ordersArray.length === 0)" class="card">
      <div class="item item-text-wrap">
        啥都没有~
      </div>
    </div>
  </ion-content>
</ion-view>
